package com.dragon.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dragon.repository.entity.ProductUnit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 产品单位 Mapper 接口
 * </p>
 *
 * @author sy
 * @since 2023-09-18
 */
@Mapper
public interface ProductUnitMapper extends BaseMapper<ProductUnit> {

    @Select("SELECT a.name AS productUnitName  FROM dragon_product_unit a WHERE a.id  = #{producUnitId}")
    String getProductUnitName(Integer productUnitId);

    @Select("SELECT a.name AS financeUnitName  FROM dragon_product_unit a WHERE a.id  = #{financeUnitId}")
    String getFinanceUnitName(Integer financeUnitId);

}
